package es.ats.codington.festival.domain;

import java.util.Date;


/***    
 * Class Event
 * This is the domain class for the Events of FERS 
 * We build the event�s structure
 *
 *
 * @author  Jos� Caballero
 * @see     domain
 * @extends Place
 * @since   1.0
 */

public class Event{
	
	//ATRIBUTES OF THE EVENT
	private String name;
	private Place place;
	private int eventId;
	private String description;
	private String type;
	private float price;
	private int duration;
	private int seatsAvailable;
	private Date start;
	
	//CONSTRUCTORS	
	
	/**
	 * Constructor of the class
	 * @param Nothin
	 * @return Initialize the params
	 */
	public Event(){
		name="";
		place=new Place();
		eventId=0;
		description="";
		type="";
		price=0;
		duration=0;
		seatsAvailable=0;
		start=new Date();
	}
	
	/**
	 * Constructor of the class
	 * @param Nothin
	 * @return Initialize the params
	 */
	public Event(String name, Place place, int eventId, String description,
			String type, float price, int duration, int seatsAvailable,
			Date start) {
		super();
		this.name = name;
		this.place = place;
		this.eventId = eventId;
		this.description = description;
		this.type = type;
		this.price = price;
		this.duration = duration;
		this.seatsAvailable = seatsAvailable;
		this.start = start;
	}

	//GETTER AND SETTERS

	public String getName() {
		return name;
	}
		
	public void setName(String name) {
		this.name = name;
	}
	public Place getPlace() {
		return place;
	}
	public void setPlace(Place place) {
		this.place = place;
	}
	
	public int getEventId() {
		return eventId;
	}
	public void setEventId(int eventId) {
		this.eventId = eventId;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public float getPrice() {
		return price;
	}

	public void setPrice(float price) {
		this.price = price;
	}

	public int getDuration() {
		return duration;
	}

	public void setDuration(int duration) {
		this.duration = duration;
	}

	public int getSeatsAvailable() {
		return seatsAvailable;
	}

	public void setSeatsAvailable(int seatsAvailable) {
		this.seatsAvailable = seatsAvailable;
	}

	public Date getStart() {
		return start;
	}

	public void setStart(Date start) {
		this.start = start;
	}
	
	public String toString(){
		String s="ID: "+eventId+"\tName: "+name+"\tDescription: "+description;
		s+="\nPlace: "+place.getPlaceId()+"\tType: "+type+"\tSeats:"+seatsAvailable;
		s+="\nDate: "+start+"\tDuration: "+duration+"\tPrice:"+price;
		return s;
	}
	
	
}
